﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Microsoft.CISG.BitlockerRecovery.BL;

namespace Microsoft.CISG.BitlockerRecovery.SS
{
    public partial class AdminMaster : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.ServerVariables["HTTPS"] == "off")
            {
                Response.Redirect(ResolveClientUrl("~/Errors/NoSSL.htm"));
            }

            int AdminRoleID = Int32.Parse(System.Configuration.ConfigurationSettings.AppSettings["AppAdminRoleID"]);
            int UserRoleID = CommonBL.ADGroupLookup(AdminRoleID);

            if (UserRoleID != AdminRoleID)
            {
                Response.Redirect("~\\Default.aspx");
            }
            Retrieval.Text = "<a class='NavLink' href='" + ResolveClientUrl("~/Admin/Default.aspx") + "'>Retrieval</a>";
            Reports.Text = "<a class='NavLink' href='" + ResolveClientUrl("~/Admin/Reports.aspx") + "'>Reports</a>";
            Configure.Text = "<a class='NavLink' href='" + ResolveClientUrl("~/Admin/Configure.aspx") + "'>Configure</a>";
            FAQ.Text = "<a class='NavLink' href='" + ResolveClientUrl("~/FAQ.aspx") + "'>Help</a>";

        }
    }
}
